#ifndef DOUBANFRAME_H
#define DOUBANFRAME_H

#include <QFrame>
class QTextEdit;
class QPlainTextEdit;
namespace Douban
{
	class DoubanFramePrivate;

	class DoubanFrame: public QFrame
	{
		Q_OBJECT
		Q_DISABLE_COPY(DoubanFrame)

		public:
			DoubanFrame();
			virtual ~DoubanFrame();

			void showError(const QString& errorString,const QString& buttonString);
			void showLoading();
			void hideLoading();

			void setContents(QWidget* miniblog,QWidget* mail);
			void changeState(int state);

			void setUnreadMailCount(int count);
			void setFMButtonVisible(bool visible);
		signals:
			void errorBtnPressed();
			void fmButtonToggled(bool);
		protected:
			void resizeEvent(QResizeEvent* event);
		private:
			DoubanFramePrivate* m_impl;
		friend class DoubanFramePrivate;
	};
}

#endif /* DOUBANFRAME_H_ */
